package com.zxx.pattern.observerPattern.observer_Z;

import java.util.Observable;
import java.util.Observer;

/**
 * @author zxx on 2021/3/9
 */
public class Watcher2 implements Observer {

    @Override
    public void update(Observable o, Object arg) {
        if (((Integer) arg).intValue() <= 5) {
            System.out.println("Watcher2's number: " + arg);
        }
    }
}
